﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Acme.BookStore2.Migrations
{
    public partial class repairattachfile : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CreatorId",
                table: "AttachFile");

            migrationBuilder.DropColumn(
                name: "FilePath",
                table: "AttachFile");

            migrationBuilder.DropColumn(
                name: "FileSource",
                table: "AttachFile");

            migrationBuilder.DropColumn(
                name: "FileUrl",
                table: "AttachFile");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "CreatorId",
                table: "AttachFile",
                type: "char(36)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "FilePath",
                table: "AttachFile",
                type: "longtext CHARACTER SET utf8mb4",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "FileSource",
                table: "AttachFile",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "FileUrl",
                table: "AttachFile",
                type: "longtext CHARACTER SET utf8mb4",
                nullable: true);
        }
    }
}
